package se.webbzon.oschi01.nbt;

import se.webbzon.oschi01.nbt.TagEvent.Action;

public class LongTag extends AbstractTag<Long> {
	
	private long l;
	
	public LongTag(TagFactory<Long> factory, String tagName, long l) {
		super(factory, tagName);
		this.l = l;
	}

	@Override public long size() {
		return 8;
	}

	@Override public Long getValue() {
		return l;
	}

	@Override public void setValue(Long value) {
		this.l = value;
		broadcastEvent(new TagEvent(this,Action.CHANGED,value));
	}

	@Override public Class<Long> getValueClass() {
		return Long.class;
	}

	@Override public AbstractTag<Long> clone() {
		return new LongTag(getFactory(),this.toString(),l);
	}

}
